package com.bw.controller;

import com.bw.bean.Vo;
import com.bw.service.OrderInfoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: OrderInfoController
 * @Author: huzx
 * @Date: 2025-06-10 10:10
 * @Version: 1.0
 **/
@RestController
public class OrderInfoController {

    @Autowired
    OrderInfoService orderInfoService;

    @RequestMapping("/test1")
    public List<Map<String,Object>> test1(){
        return orderInfoService.test1();
    }

    @RequestMapping("/test10")
    public Map test10(){
        List<Vo> list = orderInfoService.test10();
        return SugarUtil.getMapData(list);
    }

    @RequestMapping("/test11")
    public Map test11(){
        List<Vo> list = orderInfoService.test11();
        return SugarUtil.getPieData(list);
    }

    @RequestMapping("/test12")
    public Map test12(){
        Double value = orderInfoService.test12();
        return SugarUtil.getFlipNumberData(value);
    }

    @RequestMapping("/test13")
    public List<Map<String,Object>> test13(){
        return orderInfoService.test13();
    }

    @RequestMapping("/test14")
    public List<Map<String,Object>> test14(){
        return orderInfoService.test14();
    }

    @RequestMapping("/test15")
    public List<Map<String,Object>> test15(){
        return orderInfoService.test15();
    }

}
